package cn.bdqn.service.reportForms;

import cn.bdqn.dao.reportForms.UserRegisterMapper;
import cn.bdqn.pojo.reportForms.UserRegisterReportForms;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserReportFormsService  extends ServiceImpl<UserRegisterMapper,UserRegisterReportForms>{
    @Autowired
    private UserRegisterMapper userRegisterMapper;

    /**
     * 查询本月用户注册的量
     * @return
     */
    public List<UserRegisterReportForms> getUserRegisterReportFormsByOnMouth(){
        return userRegisterMapper.getUserRegisterReportFormsByOnMouth();
    }

    //查询近7天的用户注册数量
    public List<UserRegisterReportForms> Nearly7Days (String start,String end){
        return userRegisterMapper.Nearly7Days(start,end);
    }

    /**
     * 查询上个月的用户注册的量
     * @return
     */
    public List<UserRegisterReportForms> getUserRegisterReportFormsByLastOnMouth() {
        return userRegisterMapper.getUserRegisterReportFormsByLastOnMouth();
    }

    public UserRegisterReportForms getMaxByOnMouth(){
        return userRegisterMapper.getMAXandMinOnMouth();
    }

    public UserRegisterReportForms getMaxandMInLastMouth(){
        return userRegisterMapper.getMaxandMInLastMouth();
    }

}
